<%@page import="com.shsh.safemanage.model.JobPost"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.shsh.safemanage.model.User"%>
<%@page import="com.shsh.safemanage.model.Department3"%>
<%@page import="com.shsh.safemanage.model.Department2"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%@page import="com.shsh.safemanage.model.Department1"%>
<%@page import="java.util.List"%>
<%@page import="com.shsh.safemanage.dao.DaoCreator"%>
<%@page import="com.shsh.safemanage.dao.DepartmentDao"%>

<%
{
User registerUser = (User) session.getAttribute(Constants.SESSION_REGISTER_USER);
%>
<%
String depart1IDStr = request.getParameter(Constants.REQUEST_PARAMETER_DEPARTMENT1ID);
Long depart1ID = 1L;
try {
	depart1ID = new Long(depart1IDStr);
} catch (Exception e) {
}

String depart2IDStr = request.getParameter(Constants.REQUEST_PARAMETER_DEPARTMENT2ID);
Long depart2ID = 1L;
try {
	depart2ID = new Long(depart2IDStr);
} catch (Exception e) {
}

DepartmentDao departmentDao = DaoCreator.createDepartmentDao();
List<JobPost> jobPostList = departmentDao.getJobPostListByDepartmentID(depart1ID, depart2ID);
%>
<select id="depart3ID">
	<%
	for (JobPost jobPost : jobPostList) {
	%>
	<option value="<%=jobPost.getId()%>"><%=jobPost.getPostName()%></option>
	<%
	}
	%>
</select>
<%
}
%>